const mongoose = require('mongoose')
const roleSchema = mongoose.Schema({
    roleName: String,
    remark: String,
    permissionList: {
        checkedKeys: [],
        halfCheckedKeys: []
    },
    createTime : {
        type: Date,
        default: Date.now()
    },// 创建时间
    updateTime: {
        type: Date,
        default: Date.now()
    },// 更新时间
})

module.exports = mongoose.model("roles", roleSchema, "roles")//第三个参数是集合名称